import Vue from 'vue'
import App from './App'
import router from './router'
// import Axios from 'axios'
import store from './store'
import Http from './service/Http/index.js'
import { DatePicker, Input, Slider } from 'element-ui'
import commonFilter from '@/filters/common.js'
import _ from '@/libs/lodash.min.js'
import LoginService from '@/service/LoginService.js'

Vue.use(DatePicker, Input, Slider)
Vue.component(Input.name, Input)
Vue.component(Slider.name, Slider)

Object.keys(commonFilter).forEach(key => {
  Vue.filter(key, commonFilter[key])
})

Vue.prototype._ = _

// Vue.prototype.axios = Axios
Vue.use(Http)

// 登录服务
LoginService.init()

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
